<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="/ui/common/mainmodule.xsl"/>
<xsl:template match="body">
	<div class="syblog_main_frame">
		<div class="syblog_head">
			<div class="syblog_logo">
				<img src="/ui/img/logo.jpg" />
			</div>
			<div class="syblog_banner">
				<xsl:value-of disable-output-escaping="yes" select="document($tidyup)//html/body/p[@id='topbanner']" />
				<xsl:if test="system-property('xsl:vendor')='Transformiix'">
					<div style="display:none" id="syblog_transformiix"></div>
					<script language="javascript">
						var syblog_transformiix = document.getElementById("syblog_transformiix");
						syblog_transformiix.parentNode.innerHTML = syblog_transformiix.parentNode.firstChild.textContent;
					</script>
				</xsl:if>
			</div>
			<div class="syblog_stat"><xsl:apply-templates select="p[1]" /></div>
		</div>
		<div class="syblog_ctrl_bar">
			<div class="syblog_login">
				<div>
					<form id="syblog_login_form" action="/login.aspx" onsubmit="return false">
						<span>用户名：</span><input name="account" style="ime-mode:disabled" dataType="Account" min="3" max="32" msg="您输入的用户名不正确" type="text" size="16" maxlength="20" />
						<span>密码：</span><input name="pwd" min="5" max="32" msg="您输入的密码不正确" type="password" size="16" />
						<input type="checkbox" name="autologin" id="autologin" value="1" /><label for="autologin">自动登录</label>
						<input type="image" src="/ui/img/login.gif" onclick="userlogin(this.form)" />
						<a href="/register.xml" target="register">注册</a>
						<a href="/forgetpwd.xml" target="forgetpwd">找回密码</a>
					</form>
				</div>
				<div id="syblog_login_show">
					<xsl:apply-templates select="document('/checklogin.aspx')//message" />
				</div>
			</div>
			<div class="syblog_bookmark">
				<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
					<a href="#" style="behavior:url(#default#homepage)">
						<xsl:attribute name="onclick">this.setHomePage("<xsl:value-of select="document('/host.xml')//configuration/host" />");</xsl:attribute>
						<xsl:text>设为首页</xsl:text>
					</a>
					<span>|</span>
				</xsl:if>
				<a href="#">
					<xsl:attribute name="onclick">
						if(window.isIE){
							window.external.addFavorite("<xsl:value-of select="document('/host.xml')//configuration/host" />","<xsl:value-of select="document('/host.xml')//configuration/name" />")
						} else if (window.sidebar){
							window.sidebar.addPanel("<xsl:value-of select="document('/host.xml')//configuration/name" />", "<xsl:value-of select="document('/host.xml')//configuration/host" />", "")
						}
					</xsl:attribute>
					<xsl:text>加入收藏</xsl:text>
				</a>
			</div>
		</div>
		<div class="syblog_main_top">
			<div class="syblog_main_top_left">
				<div class="syblog_main_top_left_left">
					<div class="syblog_focus">
						<div class="syblog_focus_right_bar">
							<div class="syblog_focus_content">
								<div class="syblog_focus_pic">
									<a href="#" id="syblog_focus_pic" target="_blank"><img border="0" /></a>
									<div class="syblog_focus_bar">
										<div class="syblog_focus_bar_bg">&#160;</div>
										<div id="syblog_focus_bar">&#160;</div>
									</div>
								</div>
								<div class="syblog_focus_link">
									<a id="syblog_focus_link" target="_blank">&#160;</a>
								</div>
							</div>
							<div class="syblog_focus_footer_bar footer_bar"><span class="left"></span><span class="right"></span></div>
						</div>
					</div>
					<xsl:apply-templates select="document($tidyup)//html/body/p[@id='recommend']" />
				</div>
				<div class="syblog_main_top_left_right">
					<xsl:apply-templates select="document($tidyup)//html/body/p[@id='subject']" />
					<xsl:apply-templates select="document($tidyup)//html/body/p[@id='picked']" />
				</div>
			</div>
			<div class="syblog_main_top_right">
				<xsl:apply-templates select="p[2]" />
				<div class="syblog_search">
					<div class="syblog_search_right_bar">
						<div class="syblog_search_header_bar header_bar"><span class="left"></span><span class="right"></span></div>
						<div class="syblog_search_content">
							<form id="syblog_search" action="search.aspx" method="get" target="searchwin" onsubmit="return false">
								<div>
									<span>文章搜索</span>
									<input name="wd" type="text" size="20" />
								</div>
								<div>
									<input type="image" src="/ui/img/search.gif">
										<xsl:attribute name="onclick">if(this.form.elements['wd'].value.trim().length>0){this.form.submit();}</xsl:attribute>
									</input>
								</div>
							</form>
							<xsl:apply-templates select="p[3]" />
						</div>
						<div class="syblog_search_footer_bar footer_bar"><span class="left"></span><span class="right"></span></div>
					</div>
				</div>
			</div>
			<div class="clear"></div>
		</div>
		<xsl:apply-templates select="p[4]" />
		<div class="syblog_main_middle">
			<div class="syblog_main_middle_left">
				<div class="syblog_main_middle_left_left">
					<!--
					<div class="syblog_main_bottom_banner">
						<xsl:value-of disable-output-escaping="yes" select="document($tidyup)//html/body/p[@id='bottombanner']" />
						<xsl:if test="system-property('xsl:vendor')='Transformiix'">
							<div style="display:none" id="syblog_transformiix"></div>
							<script language="javascript">
								var syblog_transformiix = document.getElementById("syblog_transformiix");
								syblog_transformiix.parentNode.innerHTML = syblog_transformiix.parentNode.firstChild.textContent;
							</script>
						</xsl:if>
					</div>
					-->
					<div class="syblog_main_blogger_search">
						<form id="syblog_main_blogger_search" method="get" action="blogger.aspx" target="_blank">
							<div>性别：</div>
							<div class="blogger_search_body">
								<input type="radio" name="gender" value="0" id="gender0" checked="-1" /><label for="gender0">不限</label>
								<input type="radio" name="gender" value="1" id="gender1" /><label for="gender1">男</label>
								<input type="radio" name="gender" value="2" id="gender2" /><label for="gender2">女</label>
							</div>
							<div>年龄：</div>
							<div class="blogger_search_body">
								<select name="beginage" onchange="selectAge(this)"><option value="0" selected="-1">不限</option></select>-<select name="endage"><option value="0" selected="-1">不限</option></select>
							</div>
							<div>住地：</div>
							<div class="blogger_search_body">
								<select style="width:120px" name="province" onchange="selectProvince(this)"><option value="0" selected="-1">不限省</option></select>
                <select style="width:160px" name="city"><option value="0" selected="-1">不限市</option></select>
							</div>
							<div><input type="submit" value="找朋友" /></div>
						</form>
					</div>
					<div class="syblog_main_middle_banner">
						<xsl:value-of disable-output-escaping="yes" select="document($tidyup)//html/body/p[@id='middlebanner']" />
						<xsl:if test="system-property('xsl:vendor')='Transformiix'">
							<div style="display:none" id="syblog_transformiix"></div>
							<script language="javascript">
								var syblog_transformiix = document.getElementById("syblog_transformiix");
								syblog_transformiix.parentNode.innerHTML = syblog_transformiix.parentNode.firstChild.textContent;
							</script>
						</xsl:if>
					</div>
					<div class="syblog_main_middle_item">
						<xsl:call-template name="article" />
						<xsl:call-template name="article1" />
						<xsl:call-template name="article2" />
						<xsl:call-template name="article3" />
					</div>
					<div class="syblog_main_middle_item">
						<xsl:call-template name="article4" />
						<xsl:call-template name="article5" />
						<xsl:call-template name="article6" />
					</div>
				</div>
			</div>
			<div class="syblog_main_middle_right">
				<xsl:call-template name="top1" />
				<xsl:call-template name="top2" />
			</div>
			<div class="clear"></div>
		</div>
		<div class="syblog_main_bottom">
			<xsl:apply-templates select="document($tidyup)//html/body/p[@id='copartner']" />
			<xsl:apply-templates select="document($tidyup)//html/body/p[@id='friendlink']" />
		</div>
		<xsl:call-template name="footer" />
	</div>
</xsl:template>
<xsl:template name="captureDoubleQuot">
	<xsl:param name="processText"/>
	<xsl:choose>
		<xsl:when test="contains($processText, '&quot;')">
			<xsl:value-of select="substring-before($processText,'&quot;')" />
			<xsl:text>\&amp;quot;</xsl:text>
			<xsl:call-template name="captureDoubleQuot">
				<xsl:with-param name="processText" select="substring-after($processText,'&quot;')"/>
			</xsl:call-template>
		</xsl:when>
		<xsl:otherwise>
			<xsl:value-of select="$processText"/>
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>
<xsl:template match="/message">
	<div class="syblog_user_control">
		<xsl:choose>
			<xsl:when test="string-length(@account)>0">
				<span id="syblog_login_user"><xsl:value-of select="@name" />&#160;(<xsl:value-of select="@private" />/<xsl:value-of select="@system" />)</span><span>&#160;你好!欢迎回来!</span><a id="syblog_manage_button" href="/{@account}/#/ui/common/manager.htm" target="_blank">管理</a>
				<script type="text/javascript">
					user.account="<xsl:value-of select="@account" />".toLowerCase();
					user.name="<xsl:call-template name="captureDoubleQuot"><xsl:with-param name="processText" select="@name" /></xsl:call-template>";
				</script>
			</xsl:when>
			<xsl:otherwise>
				<span id="syblog_login_user"></span><span>你好!欢迎回来!</span><a id="syblog_manage_button" target="_blank">管理</a>
			</xsl:otherwise>
		</xsl:choose>
		<a href="#" onclick="logout();return false">注销</a>
	</div>
</xsl:template>
</xsl:stylesheet>